<script type="text/javascript" src="md5.js"></script>
<script lang=javascript>
function passCheck()
{
	
}
function antiBot()
{
    var maxNum = 9;  
    var minNum = 1;  
    var n1 = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;  
    var n2 = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;  
	var p1=document.getElementById("passwd");
	var p2=document.getElementById("passwd2");
	if(p1.value != p2.value) {
		alert('password is not consistent');
		p2.value="";
		return false;
	}
    var ans=prompt("What about " + n1 +" * " + n2 +" ?");
    if(ans != n1*n2) {
		alert("Wrong answer");
		window.open("index.php");
	}
	var hash = hex_md5(document.getElementById("passwd").value);
	document.getElementById("passwd").value = hash;
	//alert(document.getElementById("passwd").value);
	
}
</script>
<H1> Please Signup new </H1>
<form name="home" action="signup.php">
ID: <input type="text" name="uname" size=30><BR>
Password: <input type="password" name="passwd" id="passwd" size=16><BR>
Password Confirm: <input type="password" name="passwd2" id="passwd2" size=16><BR>
<input type=submit value="login" onclick="return antiBot();">

</form>
<A href=r.php> Register a new user </a>
